#include <stdio.h>
#include <stdlib.h>

#define DataType char 

typedef struct Tree
{
    DataType data;
    struct Tree* left;
    struct Tree* right;
}t;

void prevOder(t* tree)
{
    if(tree == NULL)
    {
        printf("NULL ");
        return;
    }
    printf("%c ", tree->data);
    prevOder(tree->left);
    prevOder(tree->right);
}

int main()
{
   
    t* tree1 =(t*) malloc(sizeof(t));
    tree1->data = 'A';
    tree1->left = NULL;
    tree1->right = NULL;

    t* tree2 =(t*) malloc(sizeof(t));
    tree2->data = 'B';
    tree2->left = NULL;
    tree2->right = NULL;

    t* tree3 =(t*) malloc(sizeof(t));
    tree3->data = 'C';
    tree3->left = NULL;
    tree3->right = NULL;

    t* tree4 =(t*) malloc(sizeof(t));
    tree4->data = 'D';
    tree4->left = NULL;
    tree4->right = NULL;

    t* tree5 =(t*) malloc(sizeof(t));
    tree5->data = 'E';
    tree5->left = NULL;
    tree5->right = NULL;

    t* tree6 =(t*) malloc(sizeof(t));
    tree6->data = 'F';
    tree6->left = NULL;
    tree6->right = NULL;

    t* tree7 =(t*) malloc(sizeof(t));
    tree7->data = 'G';
    tree7->left = NULL;
    tree7->right = NULL;

    t* tree8 =(t*) malloc(sizeof(t));
    tree8->data = 'H';
    tree8->left = NULL;
    tree8->right = NULL;

    tree1->left = tree2;
    tree1->right = tree3;

    tree2->left = tree4;
    tree2->right = tree5;

    tree3->left = tree6;
    tree3->right = tree7;

    tree4->left = tree8;

    prevOder(tree1);
    return 0;
    
}